package com.tuanzi.loan.web.lazy.statistics;

import org.springframework.data.domain.Page;

import com.tuanzi.loan.business.service.statistics.ExternalLoanAreaStatistisService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.statistics.ExternalLoanAreaStatistisRequest;
import com.tuanzi.loan.vo.response.statistics.ExternalLoanAreaStatistisResponse;

/**
* @author chenweijun 
* @version 2018年4月25日
*/
public class ExternalLoanAreaStatistisLazyDataModel extends BaseLazyDataModel<ExternalLoanAreaStatistisRequest, ExternalLoanAreaStatistisResponse> {

	private static final long serialVersionUID = -8524751302590740632L;
	
	private ExternalLoanAreaStatistisService externalLoanAreaStatistisService = SpringContextHolder.getBean(ExternalLoanAreaStatistisService.class); 

	public ExternalLoanAreaStatistisLazyDataModel(ExternalLoanAreaStatistisRequest searchRequest) {
		super(searchRequest);
	}

	@Override
	protected Page<ExternalLoanAreaStatistisResponse> doLoad(
			PageSearcher<ExternalLoanAreaStatistisRequest> pageSearcher) {
		return externalLoanAreaStatistisService.list(pageSearcher);
	}

}
